package com.wk.springboot.spring.lifeCircle;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

/**
 * @User admin
 * @Date 2020/11/25 14:14
 **/

@Component
public class BeanLifeCircle implements InitializingBean, DisposableBean {
    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("BeanLifeCircle初始化");
    }

    @Override
    public void destroy() throws Exception {
        System.out.println("BeanLifeCircle销毁bean");
    }
}
